import axios from "./axios.js";

// 商品分类
export const getHomeCategory = () =>
  axios.get("https://api.21cake.com", {
    params: {
      method: 'Gallery.goodsList',
      catId: 3,
      cityId: 6,
      channel: 'pc'
    }
  });

// 获取首页推荐商品和推荐文章
export const getHomeData = () =>
  axios.get("https://api.21cake.com", {
    params: {
      method: 'Advertisement.showV2',
      catId: 3,
      cityId: 8,
      channel: 'pc',
      position: 'home_floor,activity,magazine,home_floor,activity,magazine'
    }
  });

// 购物车获取推荐商品
export const getRecommendData = () =>
  axios.get("https://api.21cake.com", {
    params: {
      method: 'Advertisement.show',
      'cityId[id]': 8,
      channel: 'pc',
      position: 'cart_bottom,cart_banner,cart_suggest'
    }
  });